package com.szy.controller;
import com.szy.entity.User;
import org.springframework.web.bind.annotation.*;

/**
 * Created by As on 2015/8/20.
 */
@RestController
@RequestMapping("/user")
public class UserController {

    @RequestMapping("/{id}")
    public User view(@PathVariable("id") Integer id) {
        User user = new User();
        user.setId(id);
        user.setName("zhang");
        return user;
    }

}
